<?php
namespace Admin\Form;

use Zend\Form\Form;
use Zend\Db\Adapter\AdapterInterface;

class MonhocForm extends Form
{
	protected $dbAdapter;
    public function __construct(AdapterInterface $dbAdapter)
    {
		$this->setDbAdapter($dbAdapter);
        // we want to ignore the name passed
        parent::__construct('monhoc');

        $this->setAttribute('method', 'post');
        $this->add(array(
            'name' => 'id',
            'attributes' => array(
                'type'  => 'hidden',
            ),
        ));

        $this->add(array(
            'name' => 'tenmonhoc',
            'attributes' => array(
				'id' => 'tenmonhoc',
                'type'  => 'text',
				'required' => 'required',
            ),
            'options' => array(
                'label' => 'Tên môn học',
            ),
        ));

       

        $this->add(array(
            'name' => 'submit',
            'attributes' => array(
                'type'  => 'submit',
                'value' => 'Go',
                'id' => 'submitbutton',
            ),
        ));

    }
	
	
	public function setDbAdapter(AdapterInterface $dbAdapter)
    {
        $this->dbAdapter = $dbAdapter;

        return $this;
    }

    public function getDbAdapter()
    {
        return $this->dbAdapter;
    }
}
